package com.yhq.oj.judge.sandbox;

import com.yhq.oj.judge.sandbox.model.ExcuteCodeRequest;
import com.yhq.oj.judge.sandbox.model.ExcuteCodeResponse;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * @program: oj-backend
 * @description: 代码沙箱代理类
 * @author: HenryYang
 * @create: 2023-08-23 15:36
 **/
@Slf4j
public class CodeSandBoxProxy implements CodeSandBox {
    private final CodeSandBox codeSandBox;
    public CodeSandBoxProxy(CodeSandBox codeSandBox){
        this.codeSandBox = codeSandBox;
    }
    @Override
    public ExcuteCodeResponse excuteCode(ExcuteCodeRequest excuteCodeRequest){
        log.info("代理中：结果正常");
        return codeSandBox.excuteCode(excuteCodeRequest);
    }
}